/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "TBL_SUB_CP", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TblSubCp.findAll", query = "SELECT t FROM TblSubCp t"),
    @NamedQuery(name = "TblSubCp.findById", query = "SELECT t FROM TblSubCp t WHERE t.id = :id"),
    @NamedQuery(name = "TblSubCp.findBySc", query = "SELECT t FROM TblSubCp t WHERE t.sc = :sc"),
    @NamedQuery(name = "TblSubCp.findByTime", query = "SELECT t FROM TblSubCp t WHERE t.time = :time"),
    @NamedQuery(name = "TblSubCp.findByContent", query = "SELECT t FROM TblSubCp t WHERE t.content = :content"),
    @NamedQuery(name = "TblSubCp.findByModuleName", query = "SELECT t FROM TblSubCp t WHERE t.moduleName = :moduleName"),
    @NamedQuery(name = "TblSubCp.findByMdn", query = "SELECT t FROM TblSubCp t WHERE t.mdn = :mdn"),
    @NamedQuery(name = "TblSubCp.findByType", query = "SELECT t FROM TblSubCp t WHERE t.type = :type"),
    @NamedQuery(name = "TblSubCp.findByLastUpdatedTime", query = "SELECT t FROM TblSubCp t WHERE t.lastUpdatedTime = :lastUpdatedTime"),
    @NamedQuery(name = "TblSubCp.findByGen1", query = "SELECT t FROM TblSubCp t WHERE t.gen1 = :gen1"),
    @NamedQuery(name = "TblSubCp.findByGen2", query = "SELECT t FROM TblSubCp t WHERE t.gen2 = :gen2"),
    @NamedQuery(name = "TblSubCp.findByGen3", query = "SELECT t FROM TblSubCp t WHERE t.gen3 = :gen3")})
public class TblSubCp implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Long id;
    @Size(max = 22)
    @Column(name = "SC")
    private String sc;
    @Column(name = "TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date time;
    @Size(max = 4000)
    @Column(name = "CONTENT")
    private String content;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "MODULE_NAME")
    private String moduleName;
    @Size(max = 22)
    @Column(name = "MDN")
    private String mdn;
    @Basic(optional = false)
    @NotNull
    @Column(name = "TYPE")
    private BigInteger type;
    @Column(name = "LAST_UPDATED_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastUpdatedTime;
    @Size(max = 100)
    @Column(name = "GEN1")
    private String gen1;
    @Size(max = 150)
    @Column(name = "GEN2")
    private String gen2;
    @Size(max = 200)
    @Column(name = "GEN3")
    private String gen3;

    public TblSubCp() {
    }

    public TblSubCp(Long id) {
        this.id = id;
    }

    public TblSubCp(Long id, String moduleName, BigInteger type) {
        this.id = id;
        this.moduleName = moduleName;
        this.type = type;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSc() {
        return sc;
    }

    public void setSc(String sc) {
        this.sc = sc;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public String getMdn() {
        return mdn;
    }

    public void setMdn(String mdn) {
        this.mdn = mdn;
    }

    public BigInteger getType() {
        return type;
    }

    public void setType(BigInteger type) {
        this.type = type;
    }

    public Date getLastUpdatedTime() {
        return lastUpdatedTime;
    }

    public void setLastUpdatedTime(Date lastUpdatedTime) {
        this.lastUpdatedTime = lastUpdatedTime;
    }

    public String getGen1() {
        return gen1;
    }

    public void setGen1(String gen1) {
        this.gen1 = gen1;
    }

    public String getGen2() {
        return gen2;
    }

    public void setGen2(String gen2) {
        this.gen2 = gen2;
    }

    public String getGen3() {
        return gen3;
    }

    public void setGen3(String gen3) {
        this.gen3 = gen3;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblSubCp)) {
            return false;
        }
        TblSubCp other = (TblSubCp) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.TblSubCp[ id=" + id + " ]";
    }
    
}
